package com.example.listenerproject;

import android.content.Context;
import android.view.View;
import android.widget.Toast;

public class MyOnClickListener2 implements View.OnClickListener {

    private Context context;
    public MyOnClickListener2(Context context){
        this.context=context;
    }
    @Override
    public void onClick(View v) {
        if (v.getId()==R.id.bt_ext_listener){
            Toast.makeText(context, "外部类的点击实现-监听处理", Toast.LENGTH_SHORT).show();
        }
    }
}
